package com.example.zhiran.controller;

import com.example.zhiran.pojo.front.TempSecret;
import com.example.zhiran.service.cosservice.GenerateTempSecret;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin("localhost:8081/")
@RestController
@RequestMapping("resource")
public class ZRResourceController {

    @Autowired
    private GenerateTempSecret generateTempSecret;

    @GetMapping("/getSecret")
    public TempSecret generateSecret(@RequestParam(name = "filename") String fileName,@RequestParam("zrId") String zrId){
        return generateTempSecret.generateSecret(fileName,zrId);

    }
}
